You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Classes > Matrix Structure > Matrix Methods > Matrix.GLMSolve Method
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
Matrix.GLMSolve Method

Solves a general Gauss-Markov linear model (GLM) problem.

Syntax
C#
Visual Basic
public void GLMSolve([In] TMtx B, [In] TVec D, [In] TVec X, [In] TVec Y);

The routine solves a general Gauss-Markov linear model (GLM) problem:

minimize || y ||_2 subject to d = A*X + B*y X

where A is an N-by-M matrix, B is an N-by-P matrix, and d is a given N-vector. It is assumed that M <= N <= M+P, and 

 

rank(A] = M and rank( A B ] = N.

 

Under these assumptions, the constrained equation is always consistent, and there is a unique solution X and a minimal 2-norm solution y, which is obtained using a generalized QR factorization of the matrices (A, B) given by 

 

A = Q*(R), B = Q*T*Z (0)

 

In particular, if matrix B is square nonsingular, then the problem GLM is equivalent to the following weighted linear least squares problem

minimize || inv(B)*(d-A*X) ||_2 X

 

where inv(B) denotes the inverse of B. The sign _2, denotes Norm L2. 

References: 1.) Lapack v3.4 source code

Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!